<template>
	<view style="background-image: url(/static/yy.jpg);height: 100vh;">
		<view style="display: flex;height: 80rpx;">
			<view style="flex-grow: 1;">单号：</view>
			<view style="flex-grow: 1;">姓名</view>
			<view style="flex-grow: 1;">手机号</view>
			<view v-if="msg=='摄影师'" style="flex-grow: 1;">状态</view>
		</view>
		<view v-for="(item,index) in zuop">
			<view style="display: flex;height: 60rpx;">
				<view style="flex-grow: 1;text-align: center;">{{item.id}}</view>
				<view style="flex-grow: 1;text-align: center;">{{item.username}}</view>
				<view style="flex-grow: 1;text-align: center;">{{item.time}}</view>
				<view v-if="msg=='摄影师'" style="flex-grow: 1;text-align: center;color: blue;">{{item.state}}</view>
			</view>
		</view>
		
		
	</view>
</template>

<script>
	import {getReserve,getReserve2,isCamera} from "@/api/reserve.js"
	export default {
		components: {},
		data() {
			return {
				zuop:[],
				msg:''
			}
		},
		onLoad() {
			this.initData();
		},
		methods: {
			// 数据初始化
			async initData() {
				const res2 = await isCamera("zhangsan");
				// console.log(res2.data.msg);
				this.msg=res2.data.msg;
				
				
				const res = await getReserve2("wangwu");
				this.zuop=res.data.data;
				console.log(res.data.data);
			},
			back() {
				if (this.drawer) {
					this.closeDrawer()
				} else {
					this.$mRouter.back();
				}
			}
		}
	}
</script>

<style>
</style>